package cn.ruituo.entity;

//import com.alibaba.fastjson.annotation.JSONField;
//import org.hibernate.validator.constraints.Length;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jdk.nashorn.internal.ir.annotations.Ignore;
import springfox.documentation.annotations.ApiIgnore;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;

/**
 * @author oldliu
 * @since 1.0
 */
//s_student
@ApiModel("学生信息")
public class Student implements Serializable {
    //定义合理的列和属性的对应
    @ApiModelProperty("编号")
    private long stuno;
    @NotNull
    @NotBlank(message = "学生姓名不能不填")
    @ApiModelProperty("姓名")
    private String sname;
    @ApiModelProperty("性别")
    private String sex;
   // @Length(max = 11,min = 8,message = "号码必须是8-11位")
   @ApiModelProperty("手机号")
    private String telephone;

   // @Length(max = 15,min = 5,message = "QQ必须在15位以内")
   @ApiModelProperty("QQ号")
    private String qq;
    @ApiModelProperty("wechat号")
    private String wechat;
    @ApiModelProperty("年级号")
    private long gradeid;


    //为了显示的需要，加上年级名称
    //@JsonIgnore
    @Ignore
        private String gradename;//
    //
    //@JSONField(format = "yyyy-MM-dd")
    private Date enterdate;
    private String fromcity;
    //@JSONField(format = "yyyy-MM-dd")
    private Date birthday;
    private String address;
    private String pass;
    private String idcardpic;
    private String email;

    public long getStuno() {
        return stuno;
    }

    public void setStuno(long stuno) {
        this.stuno = stuno;
    }

    public String getSname() {
        return sname;
    }

    public void setSname(String sname) {
        this.sname = sname;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getTelephone() {
        return telephone;
    }

    public void setTelephone(String telephone) {
        this.telephone = telephone;
    }
    //@ApiIgnore
    public String getGradename() {
        return gradename;
    }
   // @ApiIgnore
    public void setGradename(String gradename) {
        this.gradename = gradename;
    }
    public String getQq() {
        return qq;
    }

    public void setQq(String qq) {
        this.qq = qq;
    }

    public String getWechat() {
        return wechat;
    }

    public void setWechat(String wechat) {
        this.wechat = wechat;
    }

    public long getGradeid() {
        return gradeid;
    }

    public void setGradeid(long gradeid) {
        this.gradeid = gradeid;
    }

    public Date getEnterdate() {
        return enterdate;
    }

    public void setEnterdate(Date enterdate) {
        this.enterdate = enterdate;
    }

    public String getFromcity() {
        return fromcity;
    }

    public void setFromcity(String fromcity) {
        this.fromcity = fromcity;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getPass() {
        return pass;
    }

    public void setPass(String pass) {
        this.pass = pass;
    }

    public String getIdcardpic() {
        return idcardpic;
    }

    public void setIdcardpic(String idcardpic) {
        this.idcardpic = idcardpic;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    @Override
    public String toString() {
        return "Student{" +
                "stuno=" + stuno +
                ", sname='" + sname + '\'' +
                ", sex='" + sex + '\'' +
                ", telephone='" + telephone + '\'' +
                ", qq='" + qq + '\'' +
                ", wechat='" + wechat + '\'' +
                ", gradeid=" + gradeid +
                ", enterdate=" + enterdate +
                ", fromcity='" + fromcity + '\'' +
                ", birthday=" + birthday +
                ", address='" + address + '\'' +
                ", pass='" + pass + '\'' +
                ", idcardpic='" + idcardpic + '\'' +
                ", email='" + email + '\'' +
                '}';
    }
}
